package structure.flyweight;

/**
 * @author dali
 * @date 2021-07-20 18:33
 * @Description
 */

public class Client {

    public static void main(String[] args) {
        Chess white1 = ChessFactory.getChess("白");
        Chess white2 = ChessFactory.getChess("白");
        Chess black1 = ChessFactory.getChess("黑");
        Chess black2 = ChessFactory.getChess("黑");
        white1.draw(1,3);
        white2.draw(2,4);
        black1.draw(3,3);
        black2.draw(2,6);
        System.out.println(white1.hashCode());
        System.out.println(white2.hashCode());
        System.out.println(black1.hashCode());
        System.out.println(black2.hashCode());
    }
}
